<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>充值</title>
<link href="images/css.css"  rel="stylesheet" type="text/css" />
<script type='text/javascript' src='js/jquery-1.4.2.min.js'></script>
<script type='text/javascript' src='js/jquery.validate.min.js'></script>
<script type='text/javascript' src='js/common.js'></script>
<SCRIPT language=javascript src="js/popup.js"></SCRIPT>
<SCRIPT language=javascript src="js/js.js"></SCRIPT>
<style type="text/css">
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.STYLE13 {color: #A3A3A3}
.STYLE15 {color: #F18910}
</style>
<script type="text/javascript">
function checkFrm()
{

  var num=$.trim($("#payNum").val()); 
    if(!isCurrency(num)){
				$("#numSpan").html("*请输入数字且最多保留2位小数.");
				$("#payNum").focus();
				return;
	}
	$("#addPayFrm").submit();
}

function isCurrency(str){
	var voidChar= /^-?\d+(\.\d{1,2})?$/;
	return voidChar.test(str);
}

function pay() {
	if ($("#payNumId").val() == "") {
		alert("请选择要充值的金额");
		return;
	}
	$("#addForm").submit();
}
</script>
</head>
<body style="margin:0px; text-align:center;"   bgcolor="#F1F1F1" >
<s:form method="post" action="pay!addTopUp.action" id="addForm">
<s:hidden name="payNum" id="payNumId"></s:hidden>
<table width="789" height="539" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
  <tr>
    <td width="789" height="39" align="left" valign="middle"><span class="STYLE1">&nbsp;<a href="javascript:void(parent.window.location.href='loginAction!login.action')" class="STYLE1">我的易彩通</a> &gt; 我的账号 &gt; 账号管理</span></td>
  </tr>
   <tr>
    <td height="500" align="left" valign="top" bgcolor="#FFFFFF" style="border:1px solid #C5C5C5; padding:1px ;"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1%" height="32" background="images/sp_bg.jpg">&nbsp;</td>
        <td width="3%" align="center" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><img src="images/dian.jpg" width="10" height="16" /></td>
        <td width="95%" align="left" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><span class="STYLE3">信息费充值</span></td>
        <td width="1%" background="images/sp_bg.jpg">&nbsp;</td>
      </tr>
    </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="48">&nbsp;</td>
        </tr>
      </table>
      
      <table width="698" height="288" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr><td height="50" colspan="2"><table width="656" height="21" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="207" height="21" align="center" bgcolor="#F6AD47"><span class="STYLE4">1.填写申请信息</span></td>
            <td width="18"><img src="images/H_1.jpg" width="16" height="21" /></td>
            <td width="207" align="center" bgcolor="#DEDEDE" class="STYLE4">2.充值信息费</td>
            <td width="16"><img src="images/H_2.jpg" width="17" height="21" /></td>
            <td width="208" align="center" bgcolor="#DEDEDE" class="STYLE4">3.申请成功</td>
          </tr>
          </table></td></tr>
        <tr>
          <td width="124" height="50" align="right">产品名称：</td>
          <td width="574" align="left">信息费</td>
        </tr>
        <tr>
          <td height="86" align="right" valign="top" style="line-height:50px;">充值金额：</td>
          <td align="left"><table  height="86" border="0" cellpadding="0" cellspacing="0">
            <tr>
            <s:if test="#session.userObject.type==0">
              <td width="112" height="86" align="center" price=30 class="priceCls" id="a1" onClick="lightHeight(this)"><img src="images/30.jpg" width="98" height="72"></td>
              <td width="112" align="center"  price=60 id="a2"  class="priceCls"  onClick="lightHeight(this)"><img src="images/60.jpg" width="98" height="72"></td>
              <td width="112" align="center"  price=90 id="a3"  class="priceCls"  onClick="lightHeight(this)"><img src="images/90.jpg" width="98" height="72"></td>
            </s:if>
              <td width="112" align="center"   price=200 id="a4"  class="priceCls"  onClick="lightHeight(this)"><img src="images/200-1.jpg" width="98" height="72"></td>
              <td width="112" align="center"  price=500 id="a5"  class="priceCls"  onClick="lightHeight(this)"><img src="images/500-1.jpg" width="98" height="72"></td>
            </tr>
          </table></td>
        </tr>

        <tr>
          <td height="51">&nbsp;</td>
          <td align="left"><img src="images/qr.jpg" onClick="pay();" width="142" height="25"></td>
        </tr>
         <s:if test="#session.userObject.type==0">
         <tr>
          <td height="51" colspan="2" class="STYLE12"><table width="677" height="36" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="88">&nbsp;</td>
                <td width="589" class="STYLE12">温磬提示： 预充值120元以上（含120元）便可升级为VIP用户，VIP会员可以使用易彩通所有版块应用 </td>
              </tr>
            </table></td>
        </tr>
        </s:if>
    </table></td>
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="8">&nbsp;</td>
  </tr>
</table>
</s:form>
</body>
</html>
 
<script>
function open1(url)
{
var r=parseInt(Math.random()*1000);
window.showModalDialog(url,window,'status:no;help:no;dialogHeight:360px; dialogWidth:450px');
}
function open2(url)
{
window.showModalDialog(url,window,'status:no;help:no;dialogHeight:900px; dialogWidth:930px');
}

function lightHeight(el) {
	$(".priceCls").css({border:""});
	$(el).css({border:"3px solid #FE8019"});
	$("#payNumId").val($(el).attr("price"));
}
</script>